﻿#region Using Directives

using System;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;

using SharePointStu.ItemAuditing.Controls;

#endregion Using Directives

namespace SharePointStu.ItemAuditing.Pages
{
    public partial class ViewWebAuditLog : Base.BaseAuditLog
    {
        #region Overridden Methods

        protected override System.Web.SiteMapNode CustomSiteMapResolve(object sender, System.Web.SiteMapResolveEventArgs e)
        {
            return e.Provider.CurrentNode;
        }

        protected override SPBasePermissions RightsRequired
        {
            get
            {
                SPBasePermissions permissions = base.RightsRequired | SPBasePermissions.EditListItems;
                return permissions;
            }
        }

        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            this.AuditLogViewer.WebId = this.WebId;
            this.AuditLogViewer.AuditType = AuditLogView.AuditTypes.Web;
        }

        #endregion Overridden Methods
    }
}
